<html>
<head>
<title>countdowns.htm</title>
<script>
// http://www.java-scripts.net/javascripts/Countdown-Timer.phtml?d2=0.0
 var milisec=0;
 var seconds;
 var timeoutID;

function display(){ 
 if (milisec<=0){ 
    milisec=9; 
    seconds-=1; 
 } 
 if (seconds<=-1){ 
    milisec=0; 
    seconds+=1;
    return; 
 } 
 else 
    milisec-=1; 
    document.counter.d2.value=seconds;
    timeoutID = setTimeout("display()",100); 
}

function resetx() {
    // alert('in reset');
    seconds = parseInt(document.counter.start.value);
    // alert(seconds);
    milisec = 0;
    document.counter.d2.value = seconds;
    display();
}

</script>
</head>
<body>
<h1>countdowns.htm</h1>
<form name="counter">
<input type="text" size="8" name="d2"><br />
<input type="text" size="8" name="start"><br />
<input type="button" onclick="resetx();" value="reset">
</form> 

<script> 
<!--
document.counter.start.value=5; 
resetx();
--> 
</script> 
</body>
</html>


